package com.changgou;

import com.changgou.utils.IdWorker;
import com.changgou.utils.TokenDecode;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.Bean;
import tk.mybatis.spring.annotation.MapperScan;

//商品服务启动类
@SpringBootApplication
@EnableEurekaClient
@MapperScan(basePackages = {"com.changgou.goods.dao"})
public class GoodsServiceApplication {

    public static void main(String[] args) {
        SpringApplication.run(GoodsServiceApplication.class, args);
    }



    /**
     *  @author: King
     *  @Date: 2019/11/12 10:41
     *  @Description:idWorker 自动生成主键ID
     */
    @Bean
    public IdWorker idWorker() {
        return new IdWorker(0, 0);
    }



    @Bean
    public TokenDecode tokenDecode() {
        return new TokenDecode();
    }

}
